import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/role/list',
    method: 'post',
    params: query
  })
}

export function create(data) {
  return request({
    url: '/api/role/create',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/api/role/update/' + data.id,
    method: 'post',
    data
  })
}

export function deletes(data) {
  return request({
    url: '/api/role/delete/' + data.id,
    method: 'post',
    data
  })
}
